package com.ruoyi.flow.flow.identity.activiti.repository;

import com.ruoyi.flow.flow.identity.activiti.entity.FlowUser;
import com.ruoyi.flow.flow.identity.activiti.enums.Status;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author wtian
 * @version 1.0
 * @since 2018/9/5 13:12
 */
public interface FlowUserRepository extends JpaRepository<FlowUser, Integer> {
    FlowUser findById(String userid);

    FlowUser findByIdAndPassword(String userid, String password);

    List<FlowUser> findByFirstNameLikeAndStatusIsNot(String firstName, Status status);

    FlowUser findByFirstName(String firstName);

    List<FlowUser> findAllByStatusIsNot(Status status);

    FlowUser findByPoliceNo(String policeNo);
}
